console.log("HelloWorld");

//每格五秒执行一次回调
// setInterval(function(){
//     console.log("get time doing");
// },1000*5);

// setTimeout(function(){
//     console.log("set time out ");
// },1000*3);

//progress(进程) 是node的一个全局模块
console.log(process.pid);
console.log(process.version);
console.log(process.platform);
console.log(process.title);
console.log(process.argv); // 在启动的时候，我们可以往程序里面传入参数,参数都是字符串

var args = process.argv.length;
if(args >= 3){
    console.log(process.argv[2]);
}
console.log(process.execPath); //node所在的路径
console.log(process.env); //获得系统的环境变量

process.on('exit',function(){
    console.log('node exit!');
});


process.on('uncaughtException',function(err){
    console.log("uncaughtException called ",err);
});

console.log(process.cwd());

process.nextTick(function() {
	console.log("nextTick");
});


notfunction_test();

console.log("after notfunction_test");